Interrupts

Real-time systems frequently are required to respond to external devices. In doing so, it is often desirable to have a real-time process respond directly to the interrupts generated by these devices. RTX64 allows a process to directly interface with a device without having to write a Windows driver.

The RTX64 interrupt management routines provide interfaces that enable an application to satisfy interrupt requests from devices attached to the computer. These interfaces let you attach a handling routine to an interrupt, much the same way that the RTX64 timer routines allow you to associate a handling routine with a given timer expiration.

NOTE: The interrupt API calls are supported only in the RTSS environment.

RTSS processes can attach to an interrupt handler using RtAttachInterrupt.

The priority assigned to the interrupt handler thread determines the priority execution order of the interrupt handler in the RTSS environment.

When an interrupt handler is attached to a particular interrupt, a thread is created which responds to the interrupt. This handling thread is analogous to an Interrupt Service Thread (IST). When the interrupt occurs, the interrupt source is masked for line-based interrupt or message-based interrupt with masking capability; the interrupt's thread is resumed; and, if its priority is greater than the priority of the currently executing thread, it becomes the currently executing thread. After the interrupt handler returns, the interrupt source is unmasked for line-based interrupt or message-based interrupt with masking capability and the thread is suspended.

Topics: